package control;

import java.io.IOException;
import java.util.List;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.SimpleTagSupport;

import model.Aluno;
import model.DAOAluno;
import model.DAOProfessor;
import model.Professor;
import model.Turma;

public class ListarCursosProfessorTag extends SimpleTagSupport{
	
	private Professor p;
	
	public void doTag ()throws JspException, IOException {
		DAOProfessor daopr = new DAOProfessor();
		List<Turma> turmas = daopr.findTurmas(p);
		getJspContext().setAttribute("turmas", turmas);
		getJspBody().invoke(null);
	}
	
	public void setId(Professor id) { 
		this.p = id; 
	}
}
